<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    


    <script>
        // Symbol 表示独一无二的值，常用于定义对象的key 来保证key 的唯一性

        let s1 = Symbol("100");
        let s2 = Symbol("100");
        console.log(s1 === s2); //false

        // let obj = {
        //     one:"100",
        //     two:"200"
        // }
        // obj.one = "张三";
        
        let o = Symbol("one");
        let t = Symbol("two");

        let obj = {
            [o]:"100",
            [t]:"200"
        }

        let w = Symbol("one");
        obj[w] = "张三";
        console.log(obj[o]);

    </script>


</body>
</html>